import React, { Component } from 'react'
import {Switch,Route,BrowserRouter} from 'react-router-dom'
import Login from './views/login'
import Index from './views/index'
//私有组件方法
import PrivateRouter from './components/privateRouter'
export default class App extends Component {
  render() {
    return (     
        <BrowserRouter>
          <Switch>
            <Route exact render={() => <Login />} path="/" />   
            <PrivateRouter component={Index} path="/index" />   
          </Switch>
        </BrowserRouter>
    )
  }
}
